package com.csun.cmny.provider.service.impl;

import com.csun.cmny.provider.dao.CacBigItemMapper;
import com.csun.cmny.provider.pojo.CacBigItem;
import com.csun.cmny.provider.service.CacBigItemService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("CacBigItemService")
public class CacBigItemServiceImpl implements CacBigItemService {
    @Resource
    CacBigItemMapper cacBigItemMapper;

    @Override
    public int insert(CacBigItem cacBigItem) {
        return cacBigItemMapper.insertSelective(cacBigItem);
    }

    @Override
    public int update(CacBigItem cacBigItem) {
        return cacBigItemMapper.updateByPrimaryKeySelective(cacBigItem);
    }

    @Override
    public CacBigItem selectCbiById(Integer bigItemId) {
        return cacBigItemMapper.selectByPrimaryKey(bigItemId);
    }

    @Override
    public int delById(Integer minorItemId) {
        return cacBigItemMapper.deleteByPrimaryKey(minorItemId);
    }

    @Override
    public CacBigItem selectByCbi(CacBigItem cacBigItem) {
        return cacBigItemMapper.selectByCbi(cacBigItem);
    }

    @Override
    public int delByTypeId(Integer cacTypeId) {
        return cacBigItemMapper.delByTypeId(cacTypeId);
    }

    @Override
    public CacBigItem selectById(Integer bigItemId) {
        return cacBigItemMapper.selectById(bigItemId);
    }
}
